#pragma once


class CKtvMessageDlg  :  public CDialogImpl<CKtvMessageDlg>
{
public:
	CKtvMessageDlg(void);
	~CKtvMessageDlg(void);

	CListBox m_wndList1;

	enum { IDD = IDD_DLG_KTV_MESSAGE };

	BEGIN_MSG_MAP(CKtvMessageDlg)
		MESSAGE_HANDLER(WM_INITDIALOG, OnInitDialog)
		COMMAND_ID_HANDLER(IDOK, OnCloseCmd)
		COMMAND_ID_HANDLER(IDCANCEL, OnCloseCmd)
		MSG_WM_ERASEBKGND(OnEraseBkgnd)
		MSG_WM_SIZE(OnSize)
		COMMAND_HANDLER(IDC_LIST_MESSAGE, LBN_DBLCLK, OnLbnDblclkListMessage)
		MESSAGE_HANDLER(WM_RBUTTONDOWN, OnRButtonDown)
	END_MSG_MAP()

	LRESULT OnInitDialog(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM /*lParam*/, BOOL& /*bHandled*/);
	LRESULT OnCloseCmd(WORD /*wNotifyCode*/, WORD wID, HWND /*hWndCtl*/, BOOL& /*bHandled*/);

	LRESULT OnEraseBkgnd(HDC hdc);
	LRESULT OnSize(UINT state, CSize Size);

	CListBox* GetListBoxCtrl(void);

	int InitCtrl(void);

	LRESULT OnLbnDblclkListMessage(WORD /*wNotifyCode*/, WORD /*wID*/, HWND /*hWndCtl*/, BOOL& /*bHandled*/);
	int ProcessDBClick(CString& strText);
	LRESULT OnRButtonDown(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM /*lParam*/, BOOL& /*bHandled*/);
};


